//
//  SandBoxStore.h
//  5.25知识点UI17_本地存储(Sandbox)
//
//  Created by dingcong on 16/5/25.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>

//导入模块
@import UIKit;
@interface SandBoxStore : NSObject

/* 单例 */
+ (instancetype)sharedSandBoxStore;

//- (NSString *)pathOfSandbox;

- (NSString *)pathForDocunmetDir;

- (NSString *)pathForLibrary;

- (NSString *)pathForCache;

//- (NSString *)pathForTmp;

- (NSString *)pathForApp;
#pragma mark - Store

- (BOOL)storeFileWithString:(NSString *)content
                        forKey:(NSString *)key;

- (NSString *)readStringForKey:(NSString *)key;


- (BOOL)storeFileWithArray:(NSArray *)content
                       forkey:(NSString *)key;

- (NSArray *)readArrayforkey:(NSString *)key;


- (BOOL)storeFileWithDictionary:(NSDictionary *)content
                            forkey:(NSString *)key;

- (NSDictionary *)reatDictionryForKey:(NSString *)key;
//作业
- (BOOL)storeFileWithData:(NSData *)content
                      forkey:(NSString *)key;



- (BOOL)storeFileWithimage:(UIImage *)image
                       forKey:(NSString *)key;


- (BOOL)storeFileWithimageData:(NSData *)imageData
                        forKey:(NSString *)key;

- (BOOL)storeByArchiverWithObject:(id)object
                           forkey:(NSString *)key;

- (id)readByUnArchiverWithKey:(NSString *)key;


- (long long)fileSizeAtPath:(NSString *)filePath;

//遍历文件夹获得文件夹大小.( 返回 兆M)
- (float)folderSizeAtPath:(NSString *)folderPatth;

//清理缓存
- (void)clearCachFile;


@end
